package com.learn.sqlSession;

import com.learn.pojo.Configuration;
import com.learn.pojo.MappedStatement;

import java.util.List;

/**
 * @author suyafei
 */
public interface Executor {
    /**
     * 查询接口
     * @param configuration
     * @param mappedStatement
     * @param params
     * @param <E>
     * @return
     * @throws Exception
     */
    public <E> List<E> query(Configuration configuration, MappedStatement mappedStatement,Object... params) throws Exception;

    /**
     *插入接口
     * @param configuration
     * @param mappedStatement
     * @param params
     * @throws Exception
     */
    public void insert(Configuration configuration, MappedStatement mappedStatement,Object... params) throws Exception;

    /**
     * 更新接口
     * @param configuration
     * @param mappedStatement
     * @param params
     * @throws Exception
     */
    public void update(Configuration configuration, MappedStatement mappedStatement,Object... params) throws Exception;

    /**
     * 删除接口
     * @param configuration
     * @param mappedStatement
     * @param params
     * @throws Exception
     */
    public void delete(Configuration configuration, MappedStatement mappedStatement,Object... params) throws Exception;
}
